(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
pred(s(x)) → x
minus(x, 0) → x
minus(x, s(y)) → pred(minus(x, y))
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, x, y) → gcd(minus(x, y), y)
if_gcd(false, x, y) → gcd(minus(y, x), x)

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
pred(s(x)) → x [1]
minus(x, 0) → x [1]
minus(x, s(y)) → pred(minus(x, y)) [1]
gcd(0, y) → y [1]
gcd(s(x), 0) → s(x) [1]
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y)) [1]
if_gcd(true, x, y) → gcd(minus(x, y), y) [1]
if_gcd(false, x, y) → gcd(minus(y, x), x) [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
pred(s(x)) → x [1]
minus(x, 0) → x [1]
minus(x, s(y)) → pred(minus(x, y)) [1]
gcd(0, y) → y [1]
gcd(s(x), 0) → s(x) [1]
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y)) [1]
if_gcd(true, x, y) → gcd(minus(x, y), y) [1]
if_gcd(false, x, y) → gcd(minus(y, x), x) [1]

The TRS has the following type information:
le :: 0:s → 0:s → true:false
0 :: 0:s
true :: true:false
s :: 0:s → 0:s
false :: true:false
pred :: 0:s → 0:s
minus :: 0:s → 0:s → 0:s
gcd :: 0:s → 0:s → 0:s
if_gcd :: true:false → 0:s → 0:s → 0:s

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added:

pred(v0) → null_pred [0]
le(v0, v1) → null_le [0]
minus(v0, v1) → null_minus [0]
gcd(v0, v1) → null_gcd [0]
if_gcd(v0, v1, v2) → null_if_gcd [0]

And the following fresh constants:

null_pred, null_le, null_minus, null_gcd, null_if_gcd

(6) Obligation:

Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
pred(s(x)) → x [1]
minus(x, 0) → x [1]
minus(x, s(y)) → pred(minus(x, y)) [1]
gcd(0, y) → y [1]
gcd(s(x), 0) → s(x) [1]
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y)) [1]
if_gcd(true, x, y) → gcd(minus(x, y), y) [1]
if_gcd(false, x, y) → gcd(minus(y, x), x) [1]
pred(v0) → null_pred [0]
le(v0, v1) → null_le [0]
minus(v0, v1) → null_minus [0]
gcd(v0, v1) → null_gcd [0]
if_gcd(v0, v1, v2) → null_if_gcd [0]

The TRS has the following type information:
le :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd → true:false:null_le
0 :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd
true :: true:false:null_le
s :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd
false :: true:false:null_le
pred :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd
minus :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd
gcd :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd
if_gcd :: true:false:null_le → 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd → 0:s:null_pred:null_minus:null_gcd:null_if_gcd
null_pred :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd
null_le :: true:false:null_le
null_minus :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd
null_gcd :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd
null_if_gcd :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd

Rewrite Strategy: INNERMOST

(7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

0 => 0
true => 2
false => 1
null_pred => 0
null_le => 0
null_minus => 0
null_gcd => 0
null_if_gcd => 0

(8) Obligation:

Complexity RNTS consisting of the following rules:

gcd(z, z') -{ 1 }→ y :|: y >= 0, z = 0, z' = y
gcd(z, z') -{ 1 }→ if_gcd(le(y, x), 1 + x, 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x
gcd(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
gcd(z, z') -{ 1 }→ 1 + x :|: x >= 0, z = 1 + x, z' = 0
if_gcd(z, z', z'') -{ 1 }→ gcd(minus(x, y), y) :|: z = 2, z' = x, z'' = y, x >= 0, y >= 0
if_gcd(z, z', z'') -{ 1 }→ gcd(minus(y, x), x) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0
if_gcd(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
le(z, z') -{ 1 }→ le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x
le(z, z') -{ 1 }→ 2 :|: y >= 0, z = 0, z' = y
le(z, z') -{ 1 }→ 1 :|: x >= 0, z = 1 + x, z' = 0
le(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
minus(z, z') -{ 1 }→ x :|: x >= 0, z = x, z' = 0
minus(z, z') -{ 1 }→ pred(minus(x, y)) :|: z' = 1 + y, x >= 0, y >= 0, z = x
minus(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
pred(z) -{ 1 }→ x :|: x >= 0, z = 1 + x
pred(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

Only complete derivations are relevant for the runtime complexity.

(9) CompleteCoflocoProof (EQUIVALENT transformation)

Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo:

eq(start(V, V1, V14),0,[le(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(start(V, V1, V14),0,[pred(V, Out)],[V >= 0]).
eq(start(V, V1, V14),0,[minus(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(start(V, V1, V14),0,[gcd(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(start(V, V1, V14),0,[fun(V, V1, V14, Out)],[V >= 0,V1 >= 0,V14 >= 0]).
eq(le(V, V1, Out),1,[],[Out = 2,V2 >= 0,V = 0,V1 = V2]).
eq(le(V, V1, Out),1,[],[Out = 1,V3 >= 0,V = 1 + V3,V1 = 0]).
eq(le(V, V1, Out),1,[le(V4, V5, Ret)],[Out = Ret,V1 = 1 + V5,V4 >= 0,V5 >= 0,V = 1 + V4]).
eq(pred(V, Out),1,[],[Out = V6,V6 >= 0,V = 1 + V6]).
eq(minus(V, V1, Out),1,[],[Out = V7,V7 >= 0,V = V7,V1 = 0]).
eq(minus(V, V1, Out),1,[minus(V8, V9, Ret0),pred(Ret0, Ret1)],[Out = Ret1,V1 = 1 + V9,V8 >= 0,V9 >= 0,V = V8]).
eq(gcd(V, V1, Out),1,[],[Out = V10,V10 >= 0,V = 0,V1 = V10]).
eq(gcd(V, V1, Out),1,[],[Out = 1 + V11,V11 >= 0,V = 1 + V11,V1 = 0]).
eq(gcd(V, V1, Out),1,[le(V12, V13, Ret01),fun(Ret01, 1 + V13, 1 + V12, Ret2)],[Out = Ret2,V1 = 1 + V12,V13 >= 0,V12 >= 0,V = 1 + V13]).
eq(fun(V, V1, V14, Out),1,[minus(V15, V16, Ret02),gcd(Ret02, V16, Ret3)],[Out = Ret3,V = 2,V1 = V15,V14 = V16,V15 >= 0,V16 >= 0]).
eq(fun(V, V1, V14, Out),1,[minus(V17, V18, Ret03),gcd(Ret03, V18, Ret4)],[Out = Ret4,V1 = V18,V14 = V17,V = 1,V18 >= 0,V17 >= 0]).
eq(pred(V, Out),0,[],[Out = 0,V19 >= 0,V = V19]).
eq(le(V, V1, Out),0,[],[Out = 0,V20 >= 0,V21 >= 0,V = V20,V1 = V21]).
eq(minus(V, V1, Out),0,[],[Out = 0,V22 >= 0,V23 >= 0,V = V22,V1 = V23]).
eq(gcd(V, V1, Out),0,[],[Out = 0,V24 >= 0,V25 >= 0,V = V24,V1 = V25]).
eq(fun(V, V1, V14, Out),0,[],[Out = 0,V26 >= 0,V14 = V27,V28 >= 0,V = V26,V1 = V28,V27 >= 0]).
input_output_vars(le(V,V1,Out),[V,V1],[Out]).
input_output_vars(pred(V,Out),[V],[Out]).
input_output_vars(minus(V,V1,Out),[V,V1],[Out]).
input_output_vars(gcd(V,V1,Out),[V,V1],[Out]).
input_output_vars(fun(V,V1,V14,Out),[V,V1,V14],[Out]).

CoFloCo proof output:
Preprocessing Cost Relations
=====================================

#### Computed strongly connected components
0. recursive : [le/3]
1. non_recursive : [pred/2]
2. recursive [non_tail] : [minus/3]
3. recursive : [fun/4,gcd/3]
4. non_recursive : [start/3]

#### Obtained direct recursion through partial evaluation
0. SCC is partially evaluated into le/3
1. SCC is partially evaluated into pred/2
2. SCC is partially evaluated into minus/3
3. SCC is partially evaluated into gcd/3
4. SCC is partially evaluated into start/3

Control-Flow Refinement of Cost Relations
=====================================

### Specialization of cost equations le/3
* CE 21 is refined into CE [24]
* CE 19 is refined into CE [25]
* CE 18 is refined into CE [26]
* CE 20 is refined into CE [27]


### Cost equations --> "Loop" of le/3
* CEs [27] --> Loop 17
* CEs [24] --> Loop 18
* CEs [25] --> Loop 19
* CEs [26] --> Loop 20

### Ranking functions of CR le(V,V1,Out)
* RF of phase [17]: [V,V1]

#### Partial ranking functions of CR le(V,V1,Out)
* Partial RF of phase [17]:
- RF of loop [17:1]:
V
V1


### Specialization of cost equations pred/2
* CE 22 is refined into CE [28]
* CE 23 is refined into CE [29]


### Cost equations --> "Loop" of pred/2
* CEs [28] --> Loop 21
* CEs [29] --> Loop 22

### Ranking functions of CR pred(V,Out)

#### Partial ranking functions of CR pred(V,Out)


### Specialization of cost equations minus/3
* CE 11 is refined into CE [30]
* CE 9 is refined into CE [31]
* CE 10 is refined into CE [32,33]


### Cost equations --> "Loop" of minus/3
* CEs [33] --> Loop 23
* CEs [32] --> Loop 24
* CEs [30] --> Loop 25
* CEs [31] --> Loop 26

### Ranking functions of CR minus(V,V1,Out)
* RF of phase [23]: [V1]
* RF of phase [24]: [V1]

#### Partial ranking functions of CR minus(V,V1,Out)
* Partial RF of phase [23]:
- RF of loop [23:1]:
V1
* Partial RF of phase [24]:
- RF of loop [24:1]:
V1


### Specialization of cost equations gcd/3
* CE 12 is refined into CE [34,35,36,37,38]
* CE 17 is refined into CE [39]
* CE 16 is refined into CE [40]
* CE 15 is refined into CE [41]
* CE 14 is refined into CE [42,43,44,45]
* CE 13 is refined into CE [46,47,48,49]


### Cost equations --> "Loop" of gcd/3
* CEs [45] --> Loop 27
* CEs [49] --> Loop 28
* CEs [44] --> Loop 29
* CEs [48] --> Loop 30
* CEs [43] --> Loop 31
* CEs [42] --> Loop 32
* CEs [47] --> Loop 33
* CEs [46] --> Loop 34
* CEs [34] --> Loop 35
* CEs [40] --> Loop 36
* CEs [35,36,37,38,39] --> Loop 37
* CEs [41] --> Loop 38

### Ranking functions of CR gcd(V,V1,Out)
* RF of phase [27,28]: [V+V1-3]
* RF of phase [31]: [V]

#### Partial ranking functions of CR gcd(V,V1,Out)
* Partial RF of phase [27,28]:
- RF of loop [27:1]:
V-1 depends on loops [28:1]
V-V1+1 depends on loops [28:1]
- RF of loop [28:1]:
V/2+V1/2-2
V1-2
* Partial RF of phase [31]:
- RF of loop [31:1]:
V


### Specialization of cost equations start/3
* CE 4 is refined into CE [50,51,52,53,54,55,56,57,58,59,60,61,62]
* CE 2 is refined into CE [63]
* CE 3 is refined into CE [64,65,66,67,68,69,70,71,72,73,74,75,76]
* CE 5 is refined into CE [77,78,79,80,81]
* CE 6 is refined into CE [82,83]
* CE 7 is refined into CE [84,85,86]
* CE 8 is refined into CE [87,88,89,90,91,92,93,94,95]


### Cost equations --> "Loop" of start/3
* CEs [78,84,90] --> Loop 39
* CEs [57] --> Loop 40
* CEs [55] --> Loop 41
* CEs [58,59] --> Loop 42
* CEs [50,51,52,53,54,56,60,61,62] --> Loop 43
* CEs [69] --> Loop 44
* CEs [71,89] --> Loop 45
* CEs [72,73,91,92] --> Loop 46
* CEs [64,65,66,67,68,70,74,75,76] --> Loop 47
* CEs [63,77,79,80,81,82,83,85,86,87,88,93,94,95] --> Loop 48

### Ranking functions of CR start(V,V1,V14)

#### Partial ranking functions of CR start(V,V1,V14)


Computing Bounds
=====================================

#### Cost of chains of le(V,V1,Out):
* Chain [[17],20]: 1*it(17)+1
Such that:it(17) =< V

with precondition: [Out=2,V>=1,V1>=V]

* Chain [[17],19]: 1*it(17)+1
Such that:it(17) =< V1

with precondition: [Out=1,V1>=1,V>=V1+1]

* Chain [[17],18]: 1*it(17)+0
Such that:it(17) =< V1

with precondition: [Out=0,V>=1,V1>=1]

* Chain [20]: 1
with precondition: [V=0,Out=2,V1>=0]

* Chain [19]: 1
with precondition: [V1=0,Out=1,V>=1]

* Chain [18]: 0
with precondition: [Out=0,V>=0,V1>=0]


#### Cost of chains of pred(V,Out):
* Chain [22]: 0
with precondition: [Out=0,V>=0]

* Chain [21]: 1
with precondition: [V=Out+1,V>=1]


#### Cost of chains of minus(V,V1,Out):
* Chain [[24],[23],26]: 3*it(23)+1
Such that:aux(1) =< V1
it(23) =< aux(1)

with precondition: [Out=0,V>=1,V1>=2]

* Chain [[24],26]: 1*it(24)+1
Such that:it(24) =< V1

with precondition: [Out=0,V>=0,V1>=1]

* Chain [[24],25]: 1*it(24)+0
Such that:it(24) =< V1

with precondition: [Out=0,V>=0,V1>=1]

* Chain [[23],26]: 2*it(23)+1
Such that:it(23) =< V1

with precondition: [V=Out+V1,V1>=1,V>=V1]

* Chain [26]: 1
with precondition: [V1=0,V=Out,V>=0]

* Chain [25]: 0
with precondition: [Out=0,V>=0,V1>=0]


#### Cost of chains of gcd(V,V1,Out):
* Chain [[31],38]: 6*it(31)+1
Such that:aux(6) =< V
it(31) =< aux(6)

with precondition: [V1=1,Out=1,V>=1]

* Chain [[31],37]: 8*it(31)+1*s(11)+2
Such that:s(11) =< 1
aux(8) =< V
it(31) =< aux(8)

with precondition: [V1=1,Out=0,V>=1]

* Chain [[31],35]: 6*it(31)+2
Such that:aux(9) =< V
it(31) =< aux(9)

with precondition: [V1=1,Out=0,V>=2]

* Chain [[31],32,38]: 6*it(31)+5*s(13)+5
Such that:s(12) =< 1
aux(10) =< V
s(13) =< s(12)
it(31) =< aux(10)

with precondition: [V1=1,Out=1,V>=2]

* Chain [[31],32,37]: 6*it(31)+6*s(11)+6
Such that:aux(11) =< 1
aux(12) =< V
s(11) =< aux(11)
it(31) =< aux(12)

with precondition: [V1=1,Out=0,V>=2]

* Chain [[27,28],38]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+1
Such that:aux(18) =< V-V1+1
aux(30) =< V+V1
aux(31) =< V+V1-Out
it(28) =< V/2+V1/2-Out/2
aux(33) =< V1
aux(34) =< V1-Out
aux(17) =< 2*V1-2*Out
aux(35) =< V
it(27) =< aux(30)
it(28) =< aux(30)
s(25) =< aux(30)
it(27) =< aux(31)
it(28) =< aux(31)
s(25) =< aux(31)
aux(15) =< aux(33)
it(28) =< aux(33)
aux(15) =< aux(34)
it(28) =< aux(34)
it(27) =< aux(17)+aux(18)
it(27) =< aux(15)+aux(35)
s(23) =< aux(15)+aux(35)
s(23) =< it(27)*aux(33)
s(24) =< s(25)
s(22) =< s(23)

with precondition: [Out>=2,V>=Out,V1>=Out]

* Chain [[27,28],37]: 4*it(27)+4*it(28)+6*s(9)+3*s(22)+2
Such that:aux(18) =< V-V1+1
aux(17) =< 2*V1
aux(36) =< V
aux(37) =< V+V1
aux(38) =< V1
it(28) =< aux(37)
s(9) =< aux(37)
it(27) =< aux(37)
it(28) =< aux(38)
it(27) =< aux(17)+aux(18)
it(27) =< aux(38)+aux(36)
s(23) =< aux(38)+aux(36)
s(23) =< it(27)*aux(38)
s(22) =< s(23)

with precondition: [Out=0,V>=2,V1>=2]

* Chain [[27,28],34,38]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+5*s(27)+5
Such that:s(26) =< 1
aux(18) =< V-V1+1
it(28) =< V/2+V1/2
aux(17) =< 2*V1
aux(39) =< V
aux(40) =< V+V1
aux(41) =< V1
s(27) =< s(26)
it(27) =< aux(40)
it(28) =< aux(40)
it(28) =< aux(41)
it(27) =< aux(17)+aux(18)
it(27) =< aux(41)+aux(39)
s(23) =< aux(41)+aux(39)
s(23) =< it(27)*aux(41)
s(24) =< aux(40)
s(22) =< s(23)

with precondition: [Out=1,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],34,37]: 4*it(27)+4*it(28)+6*s(11)+3*s(22)+3*s(24)+6
Such that:aux(42) =< 1
aux(18) =< V-V1+1
it(28) =< V/2+V1/2
aux(17) =< 2*V1
aux(43) =< V
aux(44) =< V+V1
aux(45) =< V1
s(11) =< aux(42)
it(27) =< aux(44)
it(28) =< aux(44)
it(28) =< aux(45)
it(27) =< aux(17)+aux(18)
it(27) =< aux(45)+aux(43)
s(23) =< aux(45)+aux(43)
s(23) =< it(27)*aux(45)
s(24) =< aux(44)
s(22) =< s(23)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,[31],38]: 4*it(27)+4*it(28)+6*it(31)+3*s(22)+3*s(24)+2*s(28)+5
Such that:s(28) =< 1
aux(18) =< V-V1+1
aux(46) =< V
aux(47) =< V+V1
aux(48) =< V1
aux(49) =< 2*V1
it(28) =< aux(47)
it(31) =< aux(49)
it(27) =< aux(47)
it(28) =< aux(48)
it(27) =< aux(49)+aux(18)
it(27) =< aux(48)+aux(46)
s(23) =< aux(48)+aux(46)
s(23) =< it(27)*aux(48)
s(24) =< aux(47)
s(22) =< s(23)

with precondition: [Out=1,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,[31],37]: 4*it(27)+4*it(28)+8*it(31)+3*s(11)+3*s(22)+3*s(24)+6
Such that:aux(50) =< 1
aux(18) =< V-V1+1
aux(51) =< V
aux(52) =< V+V1
aux(53) =< V1
aux(54) =< 2*V1
it(28) =< aux(52)
s(11) =< aux(50)
it(31) =< aux(54)
it(27) =< aux(52)
it(28) =< aux(53)
it(27) =< aux(54)+aux(18)
it(27) =< aux(53)+aux(51)
s(23) =< aux(53)+aux(51)
s(23) =< it(27)*aux(53)
s(24) =< aux(52)
s(22) =< s(23)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,[31],35]: 4*it(27)+4*it(28)+6*it(31)+3*s(22)+3*s(24)+2*s(28)+6
Such that:s(28) =< 1
aux(18) =< V-V1+1
aux(55) =< V
aux(56) =< V+V1
aux(57) =< V1
aux(58) =< 2*V1
it(28) =< aux(56)
it(31) =< aux(58)
it(27) =< aux(56)
it(28) =< aux(57)
it(27) =< aux(58)+aux(18)
it(27) =< aux(57)+aux(55)
s(23) =< aux(57)+aux(55)
s(23) =< it(27)*aux(57)
s(24) =< aux(56)
s(22) =< s(23)

with precondition: [Out=0,V>=3,V1>=3,V+V1>=7]

* Chain [[27,28],33,[31],32,38]: 4*it(27)+4*it(28)+6*it(31)+7*s(13)+3*s(22)+3*s(24)+9
Such that:aux(59) =< 1
aux(18) =< V-V1+1
aux(60) =< V
aux(61) =< V+V1
aux(62) =< V1
aux(63) =< 2*V1
it(28) =< aux(61)
s(13) =< aux(59)
it(31) =< aux(63)
it(27) =< aux(61)
it(28) =< aux(62)
it(27) =< aux(63)+aux(18)
it(27) =< aux(62)+aux(60)
s(23) =< aux(62)+aux(60)
s(23) =< it(27)*aux(62)
s(24) =< aux(61)
s(22) =< s(23)

with precondition: [Out=1,V>=3,V1>=3,V+V1>=7]

* Chain [[27,28],33,[31],32,37]: 4*it(27)+4*it(28)+6*it(31)+8*s(11)+3*s(22)+3*s(24)+10
Such that:aux(64) =< 1
aux(18) =< V-V1+1
aux(65) =< V
aux(66) =< V+V1
aux(67) =< V1
aux(68) =< 2*V1
it(28) =< aux(66)
s(11) =< aux(64)
it(31) =< aux(68)
it(27) =< aux(66)
it(28) =< aux(67)
it(27) =< aux(68)+aux(18)
it(27) =< aux(67)+aux(65)
s(23) =< aux(67)+aux(65)
s(23) =< it(27)*aux(67)
s(24) =< aux(66)
s(22) =< s(23)

with precondition: [Out=0,V>=3,V1>=3,V+V1>=7]

* Chain [[27,28],33,37]: 4*it(27)+4*it(28)+2*s(9)+3*s(11)+3*s(22)+3*s(24)+6
Such that:aux(69) =< 1
aux(18) =< V-V1+1
aux(70) =< V
aux(71) =< V+V1
aux(72) =< V1
aux(73) =< 2*V1
it(28) =< aux(71)
s(11) =< aux(69)
s(9) =< aux(73)
it(27) =< aux(71)
it(28) =< aux(72)
it(27) =< aux(73)+aux(18)
it(27) =< aux(72)+aux(70)
s(23) =< aux(72)+aux(70)
s(23) =< it(27)*aux(72)
s(24) =< aux(71)
s(22) =< s(23)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,35]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+2*s(28)+6
Such that:s(28) =< 1
aux(18) =< V-V1+1
it(28) =< V/2+V1/2
aux(17) =< 2*V1
aux(74) =< V
aux(75) =< V+V1
aux(76) =< V1
it(27) =< aux(75)
it(28) =< aux(75)
it(28) =< aux(76)
it(27) =< aux(17)+aux(18)
it(27) =< aux(76)+aux(74)
s(23) =< aux(76)+aux(74)
s(23) =< it(27)*aux(76)
s(24) =< aux(75)
s(22) =< s(23)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,32,38]: 4*it(27)+4*it(28)+7*s(13)+3*s(22)+3*s(24)+9
Such that:aux(77) =< 1
aux(18) =< V-V1+1
it(28) =< V/2+V1/2
aux(17) =< 2*V1
aux(78) =< V
aux(79) =< V+V1
aux(80) =< V1
s(13) =< aux(77)
it(27) =< aux(79)
it(28) =< aux(79)
it(28) =< aux(80)
it(27) =< aux(17)+aux(18)
it(27) =< aux(80)+aux(78)
s(23) =< aux(80)+aux(78)
s(23) =< it(27)*aux(80)
s(24) =< aux(79)
s(22) =< s(23)

with precondition: [Out=1,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],33,32,37]: 4*it(27)+4*it(28)+8*s(11)+3*s(22)+3*s(24)+10
Such that:aux(81) =< 1
aux(18) =< V-V1+1
it(28) =< V/2+V1/2
aux(17) =< 2*V1
aux(82) =< V
aux(83) =< V+V1
aux(84) =< V1
s(11) =< aux(81)
it(27) =< aux(83)
it(28) =< aux(83)
it(28) =< aux(84)
it(27) =< aux(17)+aux(18)
it(27) =< aux(84)+aux(82)
s(23) =< aux(84)+aux(82)
s(23) =< it(27)*aux(84)
s(24) =< aux(83)
s(22) =< s(23)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=5]

* Chain [[27,28],30,38]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+6*s(29)+5
Such that:aux(29) =< V
aux(18) =< V-V1+1
aux(30) =< V+V1
aux(31) =< V+V1-2*Out
aux(32) =< V-Out
it(28) =< V/2+V1/2-Out
aux(33) =< V1
aux(34) =< V1-Out
aux(17) =< 2*V1-2*Out
aux(85) =< Out
s(29) =< aux(85)
it(27) =< aux(30)
it(28) =< aux(30)
s(25) =< aux(30)
it(27) =< aux(31)
it(28) =< aux(31)
s(25) =< aux(31)
aux(15) =< aux(33)
it(28) =< aux(33)
aux(15) =< aux(34)
it(28) =< aux(34)
it(27) =< aux(17)+aux(18)
it(27) =< aux(15)+aux(29)
s(23) =< aux(15)+aux(32)
s(23) =< aux(15)+aux(29)
it(27) =< aux(15)+aux(32)
s(23) =< it(27)*aux(33)
s(24) =< s(25)
s(22) =< s(23)

with precondition: [Out>=2,V>=Out+1,V1>=Out+1,V+V1>=3*Out+2]

* Chain [[27,28],30,37]: 4*it(27)+4*it(28)+7*s(11)+3*s(22)+3*s(24)+6
Such that:aux(18) =< V-V1+1
it(28) =< V/2+V1/2
aux(17) =< 2*V1
aux(87) =< V
aux(88) =< V+V1
aux(89) =< V1
s(11) =< aux(87)
it(27) =< aux(88)
it(28) =< aux(88)
it(28) =< aux(89)
it(27) =< aux(17)+aux(18)
it(27) =< aux(89)+aux(87)
s(23) =< aux(89)+aux(87)
s(23) =< it(27)*aux(89)
s(24) =< aux(88)
s(22) =< s(23)

with precondition: [Out=0,V>=3,V1>=3,V+V1>=8]

* Chain [[27,28],29,38]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+6*s(32)+5
Such that:aux(29) =< V
aux(18) =< V-V1+1
aux(30) =< V+V1
aux(31) =< V+V1-2*Out
aux(32) =< V-Out
it(28) =< V/2+V1/2-Out
aux(33) =< V1
aux(34) =< V1-Out
aux(17) =< 2*V1-2*Out
aux(90) =< Out
s(32) =< aux(90)
it(27) =< aux(30)
it(28) =< aux(30)
s(25) =< aux(30)
it(27) =< aux(31)
it(28) =< aux(31)
s(25) =< aux(31)
aux(15) =< aux(33)
it(28) =< aux(33)
aux(15) =< aux(34)
it(28) =< aux(34)
it(27) =< aux(17)+aux(18)
it(27) =< aux(15)+aux(29)
s(23) =< aux(15)+aux(32)
s(23) =< aux(15)+aux(29)
it(27) =< aux(15)+aux(32)
s(23) =< it(27)*aux(33)
s(24) =< s(25)
s(22) =< s(23)

with precondition: [Out>=2,V>=Out,V1>=Out,V+V1>=3*Out]

* Chain [[27,28],29,37]: 4*it(27)+4*it(28)+7*s(11)+3*s(22)+3*s(24)+6
Such that:aux(18) =< V-V1+1
it(28) =< V/2+V1/2
aux(92) =< V
aux(93) =< V+V1
aux(94) =< V1
aux(95) =< 2*V1
s(11) =< aux(95)
it(27) =< aux(93)
it(28) =< aux(93)
it(28) =< aux(94)
it(27) =< aux(95)+aux(18)
it(27) =< aux(94)+aux(92)
s(23) =< aux(94)+aux(92)
s(23) =< it(27)*aux(94)
s(24) =< aux(93)
s(22) =< s(23)

with precondition: [Out=0,V>=2,V1>=2,V+V1>=6]

* Chain [38]: 1
with precondition: [V=0,V1=Out,V1>=0]

* Chain [37]: 2*s(9)+1*s(11)+2
Such that:s(11) =< V1
aux(7) =< V
s(9) =< aux(7)

with precondition: [Out=0,V>=0,V1>=0]

* Chain [36]: 1
with precondition: [V1=0,V=Out,V>=1]

* Chain [35]: 2
with precondition: [V1=1,Out=0,V>=1]

* Chain [34,38]: 5*s(27)+5
Such that:s(26) =< 1
s(27) =< s(26)

with precondition: [V=1,Out=1,V1>=2]

* Chain [34,37]: 6*s(11)+6
Such that:aux(42) =< 1
s(11) =< aux(42)

with precondition: [V=1,Out=0,V1>=2]

* Chain [33,[31],38]: 6*it(31)+2*s(28)+5
Such that:s(28) =< 1
aux(6) =< V1
it(31) =< aux(6)

with precondition: [V=1,Out=1,V1>=2]

* Chain [33,[31],37]: 8*it(31)+3*s(11)+6
Such that:aux(8) =< V1
aux(50) =< 1
s(11) =< aux(50)
it(31) =< aux(8)

with precondition: [V=1,Out=0,V1>=2]

* Chain [33,[31],35]: 6*it(31)+2*s(28)+6
Such that:s(28) =< 1
aux(9) =< V1
it(31) =< aux(9)

with precondition: [V=1,Out=0,V1>=3]

* Chain [33,[31],32,38]: 6*it(31)+7*s(13)+9
Such that:aux(10) =< V1
aux(59) =< 1
s(13) =< aux(59)
it(31) =< aux(10)

with precondition: [V=1,Out=1,V1>=3]

* Chain [33,[31],32,37]: 6*it(31)+8*s(11)+10
Such that:aux(12) =< V1
aux(64) =< 1
s(11) =< aux(64)
it(31) =< aux(12)

with precondition: [V=1,Out=0,V1>=3]

* Chain [33,37]: 2*s(9)+3*s(11)+6
Such that:aux(7) =< V1
aux(69) =< 1
s(11) =< aux(69)
s(9) =< aux(7)

with precondition: [V=1,Out=0,V1>=2]

* Chain [33,35]: 2*s(28)+6
Such that:s(28) =< 1

with precondition: [V=1,Out=0,V1>=2]

* Chain [33,32,38]: 7*s(13)+9
Such that:aux(77) =< 1
s(13) =< aux(77)

with precondition: [V=1,Out=1,V1>=2]

* Chain [33,32,37]: 8*s(11)+10
Such that:aux(81) =< 1
s(11) =< aux(81)

with precondition: [V=1,Out=0,V1>=2]

* Chain [32,38]: 5*s(13)+5
Such that:s(12) =< 1
s(13) =< s(12)

with precondition: [V1=1,Out=1,V>=1]

* Chain [32,37]: 6*s(11)+6
Such that:aux(11) =< 1
s(11) =< aux(11)

with precondition: [V1=1,Out=0,V>=1]

* Chain [30,38]: 6*s(29)+5
Such that:aux(85) =< Out
s(29) =< aux(85)

with precondition: [V=Out,V>=2,V1>=V+1]

* Chain [30,37]: 7*s(11)+6
Such that:aux(86) =< V
s(11) =< aux(86)

with precondition: [Out=0,V>=2,V1>=V+1]

* Chain [29,38]: 6*s(32)+5
Such that:aux(90) =< Out
s(32) =< aux(90)

with precondition: [V1=Out,V1>=2,V>=V1]

* Chain [29,37]: 7*s(11)+6
Such that:aux(91) =< V1
s(11) =< aux(91)

with precondition: [Out=0,V1>=2,V>=V1]


#### Cost of chains of start(V,V1,V14):
* Chain [48]: 45*s(309)+17*s(311)+85*s(322)+36*s(323)+68*s(325)+72*s(327)+51*s(328)+32*s(329)+41*s(330)+10
Such that:aux(129) =< 1
aux(130) =< V
aux(131) =< V-V1+1
aux(132) =< V+V1
aux(133) =< V/2+V1/2
aux(134) =< V1
aux(135) =< 2*V1
s(311) =< aux(130)
s(309) =< aux(134)
s(322) =< aux(129)
s(323) =< aux(133)
s(325) =< aux(132)
s(323) =< aux(132)
s(323) =< aux(134)
s(325) =< aux(135)+aux(131)
s(325) =< aux(134)+aux(130)
s(326) =< aux(134)+aux(130)
s(326) =< s(325)*aux(134)
s(327) =< aux(132)
s(328) =< s(326)
s(329) =< aux(132)
s(330) =< aux(135)
s(329) =< aux(134)

with precondition: [V>=0]

* Chain [47]: 213*s(381)+40*s(384)+121*s(386)+137*s(392)+20*s(403)+40*s(405)+30*s(408)+70*s(410)+36*s(421)+68*s(423)+51*s(426)+32*s(427)+16*s(429)+12
Such that:s(397) =< -V1+1
s(399) =< V1/2
s(376) =< V14+1
aux(145) =< 1
aux(146) =< -2*V1+V14+1
aux(147) =< -V1+V14
aux(148) =< V1
aux(149) =< 2*V1
aux(150) =< V14
aux(151) =< V14/2
s(381) =< aux(145)
s(384) =< aux(150)
s(384) =< s(376)
s(386) =< aux(150)
s(403) =< s(399)
s(392) =< aux(148)
s(405) =< aux(148)
s(403) =< aux(148)
s(405) =< aux(149)+s(397)
s(406) =< aux(148)
s(406) =< s(405)*aux(148)
s(408) =< s(406)
s(410) =< aux(149)
s(421) =< aux(151)
s(423) =< aux(150)
s(421) =< aux(150)
s(421) =< aux(148)
s(423) =< aux(149)+aux(146)
s(423) =< aux(148)+aux(147)
s(424) =< aux(148)+aux(147)
s(424) =< s(423)*aux(148)
s(426) =< s(424)
s(427) =< aux(150)
s(427) =< aux(148)
s(429) =< aux(147)

with precondition: [V=1,V1>=0,V14>=0]

* Chain [46]: 50*s(475)+32*s(479)+32*s(488)+8
Such that:aux(154) =< 1
aux(155) =< V
aux(156) =< V14
s(475) =< aux(154)
s(488) =< aux(155)
s(479) =< aux(156)

with precondition: [V1=1,V>=1]

* Chain [45]: 26*s(493)+42*s(496)+11
Such that:aux(158) =< 1
aux(159) =< V1
s(493) =< aux(159)
s(496) =< aux(158)

with precondition: [V=1,V1>=2]

* Chain [44]: 2*s(502)+3
Such that:s(502) =< V14

with precondition: [V=1,V1=V14,V1>=1]

* Chain [43]: 213*s(510)+40*s(513)+121*s(515)+137*s(521)+20*s(532)+40*s(534)+30*s(537)+70*s(539)+36*s(550)+68*s(552)+51*s(555)+32*s(556)+16*s(558)+12
Such that:s(505) =< V1+1
s(526) =< -V14+1
s(528) =< V14/2
aux(169) =< 1
aux(170) =< V1
aux(171) =< V1-2*V14+1
aux(172) =< V1-V14
aux(173) =< V1/2
aux(174) =< V14
aux(175) =< 2*V14
s(510) =< aux(169)
s(513) =< aux(170)
s(513) =< s(505)
s(515) =< aux(170)
s(532) =< s(528)
s(521) =< aux(174)
s(534) =< aux(174)
s(532) =< aux(174)
s(534) =< aux(175)+s(526)
s(535) =< aux(174)
s(535) =< s(534)*aux(174)
s(537) =< s(535)
s(539) =< aux(175)
s(550) =< aux(173)
s(552) =< aux(170)
s(550) =< aux(170)
s(550) =< aux(174)
s(552) =< aux(175)+aux(171)
s(552) =< aux(174)+aux(172)
s(553) =< aux(174)+aux(172)
s(553) =< s(552)*aux(174)
s(555) =< s(553)
s(556) =< aux(170)
s(556) =< aux(174)
s(558) =< aux(172)

with precondition: [V=2,V1>=0,V14>=0]

* Chain [42]: 27*s(604)+32*s(608)+8
Such that:aux(178) =< 1
aux(179) =< V1
s(604) =< aux(178)
s(608) =< aux(179)

with precondition: [V=2,V14=1,V1>=2]

* Chain [41]: 2*s(614)+3
Such that:s(614) =< V14

with precondition: [V=2,V1=V14,V1>=1]

* Chain [40]: 14*s(615)+21*s(618)+11
Such that:s(616) =< 1
aux(180) =< V1
s(615) =< aux(180)
s(618) =< s(616)

with precondition: [V=2,V1=V14+1,V1>=3]

* Chain [39]: 1
with precondition: [V1=0,V>=0]


Closed-form bounds of start(V,V1,V14):
-------------------------------------
* Chain [48] with precondition: [V>=0]
- Upper bound: 68*V+95+nat(V1)*96+nat(2*V1)*41+nat(V+V1)*172+nat(V/2+V1/2)*36
- Complexity: n
* Chain [47] with precondition: [V=1,V1>=0,V14>=0]
- Upper bound: 398*V1+261*V14+225+nat(-V1+V14)*67+10*V1+18*V14
- Complexity: n
* Chain [46] with precondition: [V1=1,V>=1]
- Upper bound: 32*V+58+nat(V14)*32
- Complexity: n
* Chain [45] with precondition: [V=1,V1>=2]
- Upper bound: 26*V1+53
- Complexity: n
* Chain [44] with precondition: [V=1,V1=V14,V1>=1]
- Upper bound: 2*V14+3
- Complexity: n
* Chain [43] with precondition: [V=2,V1>=0,V14>=0]
- Upper bound: 261*V1+398*V14+225+nat(V1-V14)*67+18*V1+10*V14
- Complexity: n
* Chain [42] with precondition: [V=2,V14=1,V1>=2]
- Upper bound: 32*V1+35
- Complexity: n
* Chain [41] with precondition: [V=2,V1=V14,V1>=1]
- Upper bound: 2*V14+3
- Complexity: n
* Chain [40] with precondition: [V=2,V1=V14+1,V1>=3]
- Upper bound: 14*V1+32
- Complexity: n
* Chain [39] with precondition: [V1=0,V>=0]
- Upper bound: 1
- Complexity: constant

### Maximum cost of start(V,V1,V14): max([32*V+55+nat(V14)*30+ (nat(V14)*2+2),nat(V1)*12+3+max([18,nat(V1)*64+60+max([nat(2*V1)*41+68*V+nat(V+V1)*172+nat(V/2+V1/2)*36,nat(V1)*162+130+nat(V14)*258+nat(V1/2)*20+nat(V14/2)*20+max([nat(2*V1)*70+nat(V14)*3+nat(-V1+V14)*67+nat(V14/2)*16,nat(2*V14)*70+nat(V1)*3+nat(V1-V14)*67+nat(V1/2)*16])])+nat(V1)*6])+ (nat(V1)*14+31)])+1
Asymptotic class: n
* Total analysis performed in 1314 ms.

(10) BOUNDS(1, n^1)